package com.whmnx.my.ui.adapter;

import android.content.Context;
import android.widget.ProgressBar;

import com.classic.adapter.BaseAdapterHelper;
import com.classic.adapter.CommonRecyclerAdapter;
import com.whmnx.base.bean.MyBagListBean;
import com.whmnx.base.utils.ImageUtil;
import com.whmnx.my.R;

/**
 * author : huang
 * date   : 2020/10/19 0019 9:17
 * version: 1.0
 * @author Administrator
 */
public class TeamAdapter extends CommonRecyclerAdapter<MyBagListBean> {
    public TeamAdapter(Context context) {
        super(context, R.layout.my_item_bodou2);
    }


    @Override
    public void onUpdate(BaseAdapterHelper helper, MyBagListBean item, int position) {
        helper.setText(R.id.tv_1, (String) item.getName());
        helper.setText(R.id.tv_CreateDate, (String) item.getCreateDate().split(" ")[0]);
        helper.setText(R.id.tv_EndDate, (String) item.getEndDate().split(" ")[0]);
        helper.setText(R.id.tv_2, item.getLeng() + "/" + item.getLang());
        ImageUtil.setImage(helper.getView(R.id.iv), item.getImage());

        ProgressBar progressBar = helper.getView(R.id.progress_bar_h);
        int  progress2 = item.getLeng();

        progressBar.setProgress(progress2);


    }
}
